package com.chen.q1.business;

import com.chen.q1.aop.service.ISchool;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.Resource;

@Data
public class School implements ISchool {
    @Autowired
    Klass klass;
    @Resource(name = "student02")
    Student student;

    @Override
    public void newSchoolYear() {
        System.out.println("Class has " + this.klass.getStudents().size() + " students and one is " + student.getName());
    }
}
